//
//  AFNetWorkingTool.h
//  SunshineMusic
//
//  Created by dllo on 16/1/9.
//  Copyright © 2016年 G.Group. All rights reserved.
//

#import <Foundation/Foundation.h>


typedef NS_ENUM(NSUInteger, GHJResponseStyle) {
    GHJJson,
    GHJXml,
    GHJData,
};
typedef NS_ENUM(NSUInteger, GHJRequestStyle) {
    GHJRequestJSON,
    GHJRequestString,
} ;

@interface AFNetWorkingTool : NSObject
/**
 *  get 请求
 *
 *  @param url                     请求网址
 *  @param body                 body
 *  @param headFile           请求头
 *  @param responseStyle 返回数据类型
 *  @param success           请求成功回调
 *  @param failure               请求失败回调
 */
+ (void)getNetWithUrl:(NSString *)url
                 body:(id)body
             headFile:(NSDictionary *)headFile
        responseStyle:(GHJResponseStyle)responseStyle
              success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
              failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;
/**
 *  post 请求
 *
 *  @param url                     请求网址
 *  @param body                 body
 *  @param bodyStyle         请求数据类型
 *  @param headFile           请求头
 *  @param responseStyle 返回数据类型
 *  @param success            请求成功回调
 *  @param failure                请求失败回调
 */
+ (void)postNetWithUrl:(NSString *)url
                  body:(id)body
             bodyStyle:(GHJRequestStyle)bodyStyle
              headFile:(NSDictionary *)headFile
         responseStyle:(GHJResponseStyle)responseStyle
               success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
               failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;


@end
